package model

import "gorm.io/gorm"

// user 用户表
type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(100)"`
	Password string `gorm:"type:varchar(100)"`
}

// userRole 用户角色表
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

// Role 角色表
type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(100)"`
}

// RoleNode 角色权限表
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

// Nodes 权限表
type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(100)"`
}

// Shop 商品表
type Shop struct {
	gorm.Model
	ShopNo   string `gorm:"type:varchar(100)"`
	ShopName string `gorm:"type:varchar(100)"`
}

// Order 订单表
type Order struct {
	gorm.Model
	OrderNo    string `gorm:"type:varchar(100)"`
	OrderPrice string `gorm:"type:varchar(100)"`
	Sid        int    `gorm:"type:int"`
}

type OrderList struct {
	ID         int
	OrderNo    string
	OrderPrice string
	ShopNo     string
	ShopName   string
}
